POV-Ray : Newsgroups : povray.advanced-users : Request: transform from a rectangle. : Re: Request: transform from a rectangle. Server Time
29 Jul 2024 08:10:42 EDT (-0400)
  Re: Request: transform from a rectangle.  
From: Slime
Date: 29 Sep 2002 14:52:02
Message: <3d974bd2@news.povray.org>
> About every three years, I come to the conclusion that the Reorient macros
> require rolling in the reorientation, but the only time I see such a
> phenomenon is in hopelessly complicated code that I wouldn't have anyone
> else wade through....


Well, the reorient macro aligns an axis of the object with a new axis, but
it doesn't specify how much the object should be rotated *around* that axis
in the process. To reorient something and really know what it's going to
look like, you need to align to two axis. That's what I did with the code I
gave you, and since the matrix transformation requires all 3 axis (x,y,z) to
be redefined, I figured out which direction the 3rd axis should point by
doing a vector cross product (which finds a vector perpendicular to the two
vectors crossed).

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.